home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
turbotut.arc
/
PROCED3.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-06-30
|
526b
|
19 lines
PROGRAM make_a_fruit_salad;
VAR apple,orange,pear,fruit : INTEGER;
PROCEDURE add_the_fruit(value1,value2 : INTEGER; (* one-way *)
VAR total : INTEGER; (* two-way *)
value3 : INTEGER); (* one-way *)
BEGIN
total := value1 + value2 + value3;
END;
BEGIN (* main program *)
apple := 4;
orange := 5;
pear := 7;
add_the_fruit(apple,orange,fruit,pear);
WRITELN('The fruit basket contains ',fruit:3,' fruits');
END. (* of main program *)